package com.example.iocdemo;

public class ComputerTest {
    public static void main(String[] args) {
        //创建对象
        Cpu cpu = new AMDCpu();
        Memory memory = new KingstonMemory();
        //配置电脑
        Computer computer = new Computer();
        computer.setBrand("小米");
        computer.setCpu(cpu);
        computer.setMemory(memory);

        //运行
        computer.start();

    }
}
